import UserLayout from '../views/Layouts/UserLayout.vue'
import BasicLayouts from '@/pages/layouts/basicLayout.vue'
export const ROUTE = [
  {
    path: '/',
    name: 'BasicLayouts',
    component: BasicLayouts,
    redirect: '/login',
    children: [
      {
        path: '/arrangement',
        name: 'arrangement',
        meta: {
          title: '船货排布',
          isChild: false,
          parentKey: 'b2'
        },
        component: () => import('@/pages/LngArrangement/index.vue')
      },
      {
        path: '/arrangementDetails',
        name: 'arrangementDetails',
        meta: {
          title: '船货排布详情',
          isChild: true,
          parentTile: '船货排布',
          parentKey: 'b2',
          parentPath: '/arrangement'
        },
        component: () => import('@/pages/LngArrangement/components/ArrangementInfo/ArrangementInfo.vue')
      },
      {
        path: '/scheduling',
        name: 'scheduling',
        meta: {
          title: '调度优化',
          isChild: false,
          parentKey: 'b2'
        },
        component: () => import('@/pages/LngScheduling/index.vue')
      },
      {
        path: '/schedulingHistory',
        name: 'schedulingHistory',
        meta: {
          title: '历史调度',
          isChild: true,
          parentTile: '调度优化',
          parentKey: 'b2',
          parentPath: '/scheduling'
        },
        component: () => import('@/pages/LngScheduling/components/SchedulingHistory/SchedulingHistory.vue')
      },
      // {
      //   path: '/cargoHistory',
      //   name: 'cargoHistory',
      //   meta: {
      //     title: '货物历史调度',
      //     isChild: true,
      //     parentTile: '调度优化',
      //     parentKey: 'b2',
      //     parentPath: '/scheduling'
      //   },
      //   component: () => import('@/pages/LngScheduling/components/SchedulingHistory/CargoHistory.vue')
      // },
      {
        path: '/schedulingDetail',
        name: 'schedulingDetail',
        meta: {
          title: '方案详情',
          isChild: true,
          parentTile: '调度优化',
          parentKey: 'b2',
          parentPath: '/scheduling'
        },
        component: () => import('@/pages/LngScheduling/components/SchedulingHistory/SchedulingDetail.vue')
      },
      {
        path: '/plan',
        name: 'plan',
        meta: {
          title: '年度计划',
          parentKey: 'b2',
          isChild: false
        },
        component: () => import('@/pages/LngAnnualPlan/index.vue')
      },
      {
        path: '/plan/schedulingDetail',
        name: 'PlanSchedulingDetail',
        meta: {
          title: '方案详情',
          isChild: true,
          parentTile: '年度计划',
          parentKey: 'b2',
          parentPath: '/plan'
        },
        component: () => import('@/pages/LngAnnualPlan/components/SchedulingHistory/SchedulingDetail.vue')
      },
      {
        path: '/plan/schedulingHistory',
        name: 'planSchedulingHistory',
        meta: {
          title: '历史调度',
          isChild: true,
          parentTile: '年度计划',
          parentKey: 'b2',
          parentPath: '/plan'
        },
        component: () => import('@/pages/LngAnnualPlan/components/SchedulingHistory/SchedulingHistory.vue')
      },
      {
        path: '/addPlan',
        name: 'addPlan',
        meta: {
          title: '新增年度计划',
          parentKey: 'b2',
          isChild: true,
          parentTile: '年度计划',
          parentPath: '/plan'
        },
        component: () => import('@/pages/LngAnnualPlan/components/AddAnnualPlanFrom/AddAnnualPlanFrom.vue')
      },
      {
        path: '/vessel',
        name: 'vessel',
        meta: {
          title: '可用船只',
          parentKey: 'b2',
          isChild: false
        },
        component: () => import('@/pages/LngAvailableVessel/components/VesselInternalGantt.vue')
      },
      {
        path: '/resourcecontract',
        name: 'resourcecontract',
        meta: {
          title: '资源合同',
          parentKey: 'b1',
          isChild: false
        },
        component: () => import('@/pages/ResourceContract/index.vue')
      },
      {
        path: '/shippingContract',
        name: 'shippingContract',
        meta: {
          title: '船运合同',
          parentKey: 'b1',
          isChild: false
        },
        component: () => import('@/pages/ShippingContract/index.vue')
      },
      {
        path: '/contractForm',
        name: 'contractForm',
        meta: {
          title: '合同范本',
          parentKey: 'b1',
          isChild: false
        },
        component: () => import('@/pages/ContractForm/index.vue')
      },
      {
        path: '/templateDetail',
        name: 'templateDetail',
        meta: {
          title: '合同模板详情',
          isChild: true,
          parentKey: 'b1',
          parentTile: '合同范本',
          parentPath: '/contractForm'
        },
        component: () => import('@/pages/ContractForm/components/TemplateDetail.vue')
      },
      // {
      //   path: '/PdfInfo',
      //   name: 'PdfInfo',
      //   title: 'PDF测试',
      //   component: () => import('@/pages/ResourceContract/components/AContractInfo/PdfInfo.vue')
      // },
      {
        path: '/AContractInfo',
        name: 'AContractInfo',
        meta: {
          title: '资源合同详情',
          isChild: true,
          parentTile: '资源合同',
          parentKey: 'b1',
          parentPath: '/resourcecontract'
        },
        component: () => import('@/pages/ResourceContract/components/AContractInfo/AContractInfo.vue')
      },
      {
        path: '/shipAContractInfo',
        name: 'shipAContractInfo',
        meta: {
          title: '船运合同详情',
          isChild: true,
          parentTile: '船运合同',
          parentKey: 'b1',
          parentPath: '/shippingContract'
        },
        component: () => import('@/pages/ShippingContract/components/AContractInfo/AContractInfo.vue')
      },
      {
        path: '/ContractLabel',
        name: 'ContractLabel',
        meta: {
          title: '合同标签',
          parentKey: 'b1',
          isChild: false
        },
        component: () => import('@/pages/ContractLabel/ContractLabel.vue')
      },
      {
        path: '/ShipAgencyContract',
        name: 'ShipAgencyContract',
        meta: {
          title: '船舶代理合同',
          parentKey: 'b1',
          isChild: false
        },
        component: () => import('@/pages/ShipAgencyContract/index.vue')
      },
      {
        path: '/ShipAgencyContractInfo',
        name: 'ShipAgencyContractInfo',
        meta: {
          title: '船舶代理合同详情',
          isChild: true,
          parentTile: '船舶代理合同',
          parentKey: 'b1',
          parentPath: '/ShipAgencyContract'
        },
        component: () => import('@/pages/ShipAgencyContract/components/AContractInfo/AContractInfo.vue')
      },
      {
        path: '/thirdMContract',
        name: 'thirdMContract',
        meta: {
          title: '第三方计量合同',
          parentKey: 'b1',
          isChild: false
        },
        component: () => import('@/pages/ThirdPartyMeasurementContract/index.vue')
      },
      {
        path: '/thirdMContractInfo',
        name: 'thirdMContractInfo',
        meta: {
          title: '第三方计量合同详情',
          parentKey: 'b1',
          isChild: true,
          parentTile: '第三方计量合同',
          parentPath: '/thirdMContract'
        },
        component: () => import('@/pages/ThirdPartyMeasurementContract/components/AContractInfo/AContractInfo.vue')
      },
      {
        path: '/InsuranceContract',
        name: 'InsuranceContract',
        meta: {
          title: '保险合同',
          parentKey: 'b1',
          isChild: false
        },
        component: () => import('@/pages/InsuranceContract/index.vue')
      },
      {
        path: '/InsuranceContractInfo',
        name: 'InsuranceContractInfo',
        meta: {
          title: '保险合同详情',
          parentKey: 'b1',
          isChild: true,
          parentTile: '保险合同',
          parentPath: '/InsuranceContract'
        },
        component: () => import('@/pages/InsuranceContract/components/AContractInfo/AContractInfo.vue')
      },
      {
        path: '/RefuelingContract',
        name: 'RefuelingContract',
        meta: {
          title: '加油合同',
          parentKey: 'b1',
          isChild: false
        },
        component: () => import('@/pages/RefuelingContract/index.vue')
      },
      {
        path: '/RefuelingContractInfo',
        name: 'RefuelingContractInfo',
        meta: {
          title: '加油合同详情',
          parentKey: 'b1',
          isChild: true,
          parentTile: '加油合同',
          parentPath: '/RefuelingContract'
        },
        component: () => import('@/pages/RefuelingContract/components/AContractInfo/AContractInfo.vue')
      },
      {
        path: '/LawyersContract',
        name: 'LawyersContract',
        meta: {
          title: '律师合同',
          parentKey: 'b1',
          isChild: false
        },
        component: () => import('@/pages/LawyersContract/index.vue')
      },
      {
        path: '/LawyersContractInfo',
        name: 'LawyersContractInfo',
        meta: {
          title: '律师合同详情',
          parentKey: 'b1',
          isChild: true,
          parentTile: '律师合同',
          parentPath: '/LawyersContract'
        },
        component: () => import('@/pages/LawyersContract/components/AContractInfo/AContractInfo.vue')
      },
      {
        path: '/ShipExecution',
        name: 'ShipExecution',
        meta: {
          title: '船运执行',
          parentKey: 'b4',
          isChild: false
        },
        component: () => import('@/pages/LngShippingExecution/index.vue')
      },
      {
        path: '/ShipExecutionInfo',
        name: 'ShipExecutionInfo',
        meta: {
          title: '船舶执行信息',
          parentKey: 'b4',
          isChild: true,
          parentTile: '船运执行',
          parentPath: '/ShipExecution'
        },
        component: () => import('@/pages/LngShippingExecution/components/ShipingInfo/ShipInfoIndex.vue')
      },
      {
        path: '/exportList',
        name: 'exportList',
        meta: {
          title: '导出任务',
          parentKey: 'b3',
          isChild: false
        },
        component: () => import('@/pages/SystemManger/exportTable.vue')
      },
      {
        path: '/workbench',
        name: 'workbench',
        meta: {
          title: '工作台',
          isChild: false
        },
        component: () => import('@/pages/Workbench/Workbench.vue')
      },
      {
        path: '/NauticalChart',
        name: 'NauticalChart',
        meta: {
          title: '海图',
          isChild: false
        },
        component: () => import('@/pages/NauticalChart/NauticalChart.vue')
      }
    ]
  }
]

export const constantRouterMap = [
  {
    path: '/Login',
    component: UserLayout,
    redirect: '/Login',
    name: 'UserLayout',
    children: [
      {
        path: '/Login',
        name: 'login',
        component: () => import('@/pages/Login/Login.vue')
      },
      {
        path: '/home',
        name: 'home',
        component: () => import('@/pages/Home/Home.vue')
      },
    ]
  }
]
